package com.huawei.hwclouds.lubanops.demo.order.client;

import java.util.HashMap;
import java.util.Map;

import org.apache.commons.lang3.StringUtils;

import com.huawei.hwclouds.lubanops.demo.common.client.HeaderFactory;

/**
 * @author y00438022
 * @since 2020/11/7
 **/
public class OrderHeaderFactory implements HeaderFactory {

    private static final String APIG_APPCODE = StringUtils.isBlank(System.getenv("apig_appcode"))
        ? ""
        : System.getenv("apig_appcode");

    @Override
    public Map<String, String> makeHeader() {
        Map<String, String> headers = new HashMap<>();
        headers.put("X-Apig-AppCode", APIG_APPCODE);
        return headers;
    }
}
